<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<title>${sp.system_title}</title>
	<meta name="referrer" content="no-referrer" />
	<meta name="Keywords" Content="${sp.html_head_Keywords}" />
	<meta name="Description" Content="${sp.html_head_Description}" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<!-- 系统ICO图标 -->
	<link href="<%=request.getContextPath()%>/img/zico.ico" rel="shortcut icon" type="image/x-icon"
		  media="screen,print" />

	<!-- 添加jQuery -->
	<script src="<%=request.getContextPath()%>/js/jquery-3.3.1.min.js"></script>

	<!-- 添加BootStrap -->
	<script src="<%=request.getContextPath()%>/js/bootstrap-4.6.0/js/popper.min.js" type="text/javascript"></script>
	<link href="<%=request.getContextPath()%>/js/bootstrap-4.6.0/css/bootstrap.min.css" rel="stylesheet"
		  type="text/css" media="screen,print" />
	<script src="<%=request.getContextPath()%>/js/bootstrap-4.6.0/js/bootstrap.min.js"
			type="text/javascript"></script>

	<!-- EasyUI -->
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/jquery.easyui.min.js"></script>
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/plugins/jquery.datagrid.js"></script>
	<link href="<%=request.getContextPath()%>/js/jquery-easyui-1.8.8/themes/gray/easyui.css" rel="stylesheet"
		  type="text/css" media="screen,print" />

	<!-- 添加平台公用js css -->
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/z.js?version=${sp.zversion}"
			charset="UTF-8"></script>
	<link href="<%=request.getContextPath()%>/js/z.css?version=${sp.zversion}" rel="stylesheet" type="text/css"
		  media="screen,print" />

	<script type="text/javascript">
		$(document).ready(function () {
			$("#userid").focus();
		});
		function LoginSystem() {
			var userid = $("#userid").val();
			var passwordid = $("#passwordid").val();
			if (!isNull(userid)) {
				if (!isNull(passwordid)) {
					//判读账号对应分配组织是否这多个
					$("#LoginForm").submit();
				} else {
					$("#UserLoginAlert").html("密码不能为空");
					document.getElementById('passwordid').focus();
				}
			} else {
				$("#UserLoginAlert").html("账号不能为空");
				document.getElementById('userid').focus();
			}
		}

		function Login_onkeydown() {
			if (event.keyCode == 13) {
				var userid = $("#userid").val();
				var passwordid = $("#passwordid").val();
				if (isNull(userid)) {
					$("#userid").focus();
					return;
				} else if (isNull(passwordid)) {
					$("#passwordid").focus();
					return;
				} else {
					LoginSystem();
				}
			}

		}
	</script>
</head>

<body>
<div class="container">
	<div class="row vh-100 d-flex align-items-center">
		<div class="col-4"></div>
		<div class="col-4">
			<form action="CustomerLogin" method="get" id="LoginForm" enctype="multipart/form-data">
				<h3 class="text-center">客户登录</h3>
				<div class="form-group">
					<label>账 号</label>
					<input type="text" class="form-control" id="userid" name="user_id"
						   onkeydown="Login_onkeydown();" maxlength="16" autofocus="autofocus"
						   placeholder="请输入客户账号\手机号\身份证号\邮箱">
				</div>
				<div class="form-group">
					<label>密 码</label>
					<input type="password" class="form-control" id="passwordid" name="password" placeholder="请输入密码" onkeydown="Login_onkeydown();">
				</div>
				<div class="form-group d-flex align-items-center justify-content-between ">
					<button type="submit" class="btn btn-primary" onclick="LoginSystem()"> 登 录 </button>
					<a href="customer_add" class="text-decoration-none fs20"> 注册账号 </a>
				</div>

				<div class="form-group mt-2">
					<label id="UserLoginAlert" style="color: red;">${UserLoginAlert}</label>
				</div>
			</form>
		</div>
		<div class="col-4"></div>
	</div>
</div>
</body>

</html>